#include "contiki.h"

#include "acp.h"
#include "dev/cc2420.h"
#include "mac_config.h"

#include <stdio.h>
#include <string.h>

static struct sacp_conn s_conn;

PROCESS(sconn_process, "stationarySensor conn");

PROCESS_THREAD(sconn_process, ev, data){
  PROCESS_BEGIN();

  cc2420_set_txpower(CC2420_TX_POWER);
  cc2420_set_channel(IEEE802_15_4_CHANNEL);

  s_conn.acp_conn.conn_type = ACP_CONN_SSENSOR;

  acp_start((struct acp_conn *)&s_conn);

  PROCESS_END();
}

void scomm_process_start(struct subManager* s_manager,  dflist_t dflist)
{

  s_conn.smanager = s_manager;
  s_conn.dflist = dflist;

  process_start(&sconn_process, NULL);
}



